<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<script>
		window.onload= function () {
			del = document.getElementsByClassName("del");

			for (var i = 0; i < del.length; i++) {
				del[i].onclick = function () {
					this.parentNode.parentNode.style.display="none";
				}
			}
		}	
	</script>
</head>
<body>
	<table border="1">
		<tr>
			<td>id</td>
			<td>姓名</td>
			<td>学号</td>
			<td>操作</td>
		</tr>
		<tr>
			<td>1</td>
			<td>小明</td>
			<td>201802</td>
			<td><a class="del">删除</a></td>
		</tr>
		<tr>
			<td>2</td>
			<td>小花</td>
			<td>201805</td>
			<td><a class="del">删除</a></td>
		</tr>
		<tr>
			<td>3</td>
			<td>小红</td>
			<td>201807</td>
			<td><a class="del">删除</a></td>
		</tr>
	</table>
</body>
</html>